<template>
  <div class='detail bc-gray'>
    <header class="bc-white">
      <p class="title">{{detailData.vote&&detailData.vote.title}}</p>
      <p class="info">{{detailData.vote&&detailData.vote.descript}}</p>
    </header>
    <ul class="">
      <li v-for="(item,index) in detailData.info">
        <span>{{item.title}}：{{item.number||0}}票</span>
        <div class="process-box"><van-progress :percentage="item | formatRaate" /></div>
      </li>
    </ul>
  </div>
</template>
<script>
import MixDetail from "../../../../../mixin/mixin.js";
export default {
  components: {},
  name: "",
  data() {
    return {};
  },
  methods: {},
  filters:{
    formatRaate(val){
      return Number(val.all>0?(val.number/val.all*100).toFixed(0):0)
    }
  },
  created() {},
  mixins: [MixDetail]
};
</script>
<style lang="scss" scoped>
.detail {

  header,ul{
    padding: 20px;
  }
  ul{
    margin-top: 5px;

    li{
      margin-bottom: 10px;

      .process-box{
        padding: 20px 0;
      }
    }
  }
  .title{
    font-size: 16px;
  }
  .info{
    font-size: 12px;
    color: #666;
  }
}
</style>